package com.mc.read.adminapi.controller;

import com.mc.read.adminapi.service.SystemService;
import com.mc.read.vo.request.BaseRequest;
import com.mc.read.vo.respose.BaseRespose;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author liuhao
 * @date 2019/6/12 17:51
 * 日志
 */
@Controller
@RequestMapping(value = "/verify/system")
@Slf4j
public class SystemController {
    @Autowired
    SystemService systemService;

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 查询日志列表 selectLogList
     **/
    @ResponseBody
    @RequestMapping(value = "selectLogList", method = RequestMethod.POST)
    public BaseRespose selectLogList(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = systemService.selectLogList(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 查询意见反馈列表 selectOpinionList
     **/
    @ResponseBody
    @RequestMapping(value = "selectOpinionList", method = RequestMethod.POST)
    public BaseRespose selectOpinionList(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = systemService.selectOpinionList(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 处理意见反馈 dealOpinion
     **/
    @ResponseBody
    @RequestMapping(value = "dealOpinion", method = RequestMethod.POST)
    public BaseRespose dealOpinion(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = systemService.dealOpinion(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 菜单栏渲染 selectMenuList
     **/
    @ResponseBody
    @RequestMapping(value = "selectMenuList", method = RequestMethod.POST)
    public BaseRespose selectMenuList(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = systemService.selectMenuList(baseRequest);
        return baseRespose;
    }
}
